import 'package:flutter/services.dart';

class SystemUiUtil {
  /// 进入全屏模式并隐藏系统按键
  static void enterFullScreen() {
    SystemChrome.setEnabledSystemUIMode(
      SystemUiMode.immersiveSticky,
      overlays: [], // 清空overlays使其完全隐藏状态栏和导航栏
    );
  }

  /// 退出全屏模式并显示系统按键
  static void exitFullScreen() {
    SystemChrome.setEnabledSystemUIMode(
      SystemUiMode.manual,
      overlays: SystemUiOverlay.values, // 显示所有系统UI
    );
  }

  /// 临时显示系统UI（会在一段时间后自动隐藏）
  static void temporaryShowSystemUI() {
    SystemChrome.setEnabledSystemUIMode(
      SystemUiMode.immersiveSticky,
      overlays: SystemUiOverlay.values,
    );
  }
} 